//package com.inspur.edp.cef.generator.coreGenerator.base.serializer;
//
//import com.inspur.edp.caf.generator.baseInfo.TypeInfo;
//import com.inspur.edp.caf.generator.field.FieldGenerator;
//import com.inspur.edp.caf.generator.utils.ExpressionUtils;
//import com.inspur.edp.cef.designtime.api.IGspCommonField;
//import com.inspur.edp.cef.designtime.api.entity.MdRefInfo;
//import com.inspur.edp.cef.generator.overall.CefGeneratorContext;
//import com.inspur.edp.cef.generator.overall.GenUtils;
//import com.inspur.edp.cef.spi.jsonser.base.IDynamicPropSerItem;
//import org.eclipse.jdt.core.dom.Expression;
//import org.eclipse.jdt.core.dom.MethodInvocation;
//import org.eclipse.jdt.core.dom.Modifier.ModifierKeyword;
//import org.springframework.util.StringUtils;
//
//public class DynamicSerItemsFieldGenerator extends FieldGenerator
//{
//	private IGspCommonField element;
//	private CefGeneratorContext cefGenContext;
//
//	public DynamicSerItemsFieldGenerator(IGspCommonField element, CefGeneratorContext cefGenContext)
//	{
//		this.element = element;
//		this.cefGenContext = cefGenContext;
//	}
//
//
//	@Override
//	protected java.util.ArrayList<ModifierKeyword>  getAccessModifier() { return new java.util.ArrayList<ModifierKeyword>(java.util.Arrays.asList(new ModifierKeyword[] { ModifierKeyword.PRIVATE_KEYWORD, ModifierKeyword.STATIC_KEYWORD })); }
//
//
//	@Override
//	protected String  getFieldName() { return getFieldName(element); }
//
//
//	public static String  getFieldName(IGspCommonField item) { return item.getLabelID() + "SerItem"; }
//
//
//	@Override
//	protected TypeInfo getFieldType() { return new TypeInfo(IDynamicPropSerItem.class); }
//
//	@Override
//	protected Expression buildGetMethodBody()
//	{
//		MdRefInfo compInfo = element.getDynamicPropSetInfo().getDynamicPropSerializerComp();
//		if(compInfo == null){
//			return ast.newNullLiteral();
//		}
//		if (StringUtils.isEmpty(compInfo.getId())) {
//			throw new RuntimeException(element.getName()+"上的序列化构件元数据"+compInfo.getName()+"不存在");
//		}
//		MethodInvocation getInstance = ast.newMethodInvocation();
//		getInstance.setExpression(ast.newName("com.inspur.edp.cef.spi.common.ComponentInvokUtil"));
//		getInstance.setName(ast.newSimpleName("getInstance"));
//		getInstance.arguments().add(ExpressionUtils.getStringLiteral(ast, compInfo.getId()));
//		return GenUtils.buildCastExpression(ast, IDynamicPropSerItem.class, getInstance);
//	}
//}